const AccessToken = "accessMyDemoToken";
const User = "user";
const ActId = "actId";

//** --------------------------------------------------- token --------------------------------------------------- */
export function getAccessToken() {
  return uni.getStorageSync(AccessToken);
}
export function setAccessToken(token: string) {
  return uni.setStorageSync(AccessToken, token);
}
export function removeAccessToken() {
  return uni.removeStorageSync(AccessToken);
}

//** --------------------------------------------------- 个人信息 --------------------------------------------------- */
export function getUser() {
  return uni.getStorageSync(User) ? uni.getStorageSync(User) : {};
}
export function setUser(user: any) {
  return uni.setStorageSync(User, user);
}
export function removeUser() {
  return uni.removeStorageSync(User);
}

//** ---------------------------------------------------  --------------------------------------------------- */
export function getActId() {
  return uni.getStorageSync(ActId) ? uni.getStorageSync(ActId) : '';
}
// export function setActId(ActId) {
//   return uni.setStorageSync(ActId, actId);
// }
export function removeActId() {
  return uni.removeStorageSync(ActId);
}
